Skip to content

Conversation

codedfinger
Copy link

No description provided.

@codedfinger
Copy link
Author

hotfix: On update of profile image, an error is returned from the mongoose function findByIdAndUpdate.

A detailed explanation can be found here: https://stackoverflow.com/questions/66370059/findoneandupdate-callback-must-be-a-function-got-object-object-nodejs-mon

@codedfinger
Copy link
Author

Also a loop after updating profile image as !req.file checks if there is no file. But using result.url with return the accurate response by checking if image URL was updates on the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant